﻿using Core.Configuration.Helper;
using System;

namespace Core.Configuration.Config
{
    public class GlobalConfig
    {
        /// <summary>
        /// 数据库字符串
        /// </summary>
        public static readonly string DbConnectionString = AppSettings.Get("DbConnection", "ConnectionString");
        /// <summary>
        /// 数据库类型
        /// </summary>
        public static readonly string DbType = AppSettings.Get("DbConnection", "DbType");
        /// <summary>
        /// Redis连接字符串
        /// </summary>
        public static readonly string RedisConnectionString = AppSettings.Get("RedisServer", "ConnectionString");
        /// <summary>
        /// 静态文件域名
        /// </summary>
        public static readonly string ApiDomain = AppSettings.Get("GlobalConfig", "ApiDomain");
        /// <summary>
        /// 静态文件域名
        /// </summary>
        public static readonly string CdnDomain= AppSettings.Get("GlobalConfig", "CdnDomain");
        /// <summary>
        /// 上传的路径
        /// </summary>
        public static readonly string UploadDir = AppSettings.Get("GlobalConfig", "UploadDir");
        /// <summary>
        /// 上传文件的访问路由
        /// </summary>
        public static readonly string UploadRoute = AppSettings.Get("GlobalConfig", "UploadRoute");
        /// <summary>
        /// 升级的分类id
        /// </summary>
        public static readonly string UpgradeCategoryId = AppSettings.Get("GlobalConfig", "UpgradeCategory");
        /// <summary>
        /// 积分兑换分类
        /// </summary>
        public static readonly string ExchangeCategoryId = AppSettings.Get("GlobalConfig", "ExchangeCategory");
        /// <summary>
        /// 限购商品id，若购买相同商品，需等上一次订单完成后才能下单
        /// </summary>
        public static readonly string LimitGoodsId = AppSettings.Get("GlobalConfig", "LimitGoodsId");
        /// <summary>
        /// 项目根目录
        /// </summary>
        public static readonly string BaseDirectory = AppSettings.Get("GlobalConfig", "BaseDirectory");
        /// <summary>
        /// IP 归属地文件的完整目录
        /// </summary>
        public static readonly string IpFilePath= AppSettings.Get("GlobalConfig", "IpFilePath");
    }
}
